package com.example.gc.myapplication;

import android.app.Service;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;
import android.support.annotation.Nullable;
import android.util.Log;

/**
 * Created by gc on 2016/4/5.
 */
public class MyBindService extends Service {
    private static final String TAG = "info";
    @Override
    public void onCreate() {
        Log.i(TAG, "BindService onCreate");
        super.onCreate();
    }
    public class MyBinder extends Binder{
        public MyBindService getService(){
            return MyBindService.this;
        }
    }
    @Nullable
    @Override
    public IBinder onBind(Intent intent) {
        Log.i(TAG, "BindService onBind");
        return new MyBinder();
    }

    @Override
    public boolean onUnbind(Intent intent) {
        Log.i(TAG, "BindService onUnbind");
        return super.onUnbind(intent);
    }

    public void play(){
        Log.i(TAG,"播放");
    }
    public void stop(){
        Log.i(TAG,"暂停");
    }
    public void last(){
        Log.i(TAG,"上一首");
    }
    public void next(){
        Log.i(TAG,"下一首");
    }
}
